﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LevelSingleton
{
    private static LevelSingleton Instance;
	
    /// <summary>
    /// 获取单例
    /// </summary>
    /// <returns></returns>
    public static LevelSingleton GetInstance()
    {
        if (Instance==null)
        {
            Instance = new LevelSingleton();
        }
        return Instance;
    }

    //构造私有化
    private LevelSingleton()
    {
        //实例化字典
        levelData = new Dictionary<int, int>();
    }

    /// <summary>
    /// 当前选择的关卡编号
    /// </summary>
    public int currentLevelIndex = 0;
    /// <summary>
    /// 关卡数据
    /// </summary>
    public Dictionary<int, int> levelData;
    //当前玩家玩到的最高关卡
    public int maxLevelIndex = 1;
}
